//
// Created by imagination on 4/1/25.
//

#ifndef APP_H
#define APP_H

#include "lvgl/lvgl.h"

struct language_item {
    char * name;
    char * locale_name;
};

struct font_item {
    char * name;
    const lv_font_t * font;
};

struct settings {
    uint8_t font_index;
    uint8_t language_index;
    uint8_t camera_mirror_mode;
    uint8_t reversing_guide_lines_mode;
    uint8_t suspension_key_mode;
    uint8_t driving_mode;
    uint8_t time_format;
};

struct display_settings {
    uint8_t brightness;
    uint8_t contrast;
    uint8_t hue;
    uint8_t saturation;
};

struct application {
    int32_t dpi;
    int32_t hor_res;
    int32_t ver_res;
    char orientation;

    struct language_item support_language[3];
    struct font_item support_fonts[2];

    lv_fragment_manager_t * manager;
    lv_obj_t * container;

    struct settings settings;
    struct display_settings display_settings;
};

void app_init();

extern struct application app;

#endif //APP_H
